<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
	<title>{lang create_corpus}</title>
	<link href="dzz/corpus/images/mobile/css/weui.css?{VERHASH}" rel="stylesheet" media="all">
	<link href="dzz/corpus/images/mobile/css/my.css?{VERHASH}" rel="stylesheet" media="all">
	<script src="static/jquery/jquery.min.js?{VERHASH}" type="text/javascript"></script>
</head>
<body>
<!-- 小组 -->
<div class="container-fluid">
	<form class="form " id="newcorpus_form" role="form" method="post" action="{MOD_URL}&op=menu&do=newcorpus" onsubmit="return newcorpus_submit(this);">
		<p id="return_newcorpus" class="text-danger" style="text-align: center;margin: 0;"></p>
		<input type="hidden" name="handlekey" value="newcorpus" />
		<input type="hidden" name="newcorpussubmit" value="true" />
		<input type="hidden" name="formhash" value="{FORMHASH}" />
		<input type="hidden" name="orgid" value="$orgid" />			
		<div class="weui-flex appTeam_top1">
        	<div class="weui-flex__item"><a class="placeholder returnDiv" href="javascript:history.go(-1)"><img src="dzz/corpus/images/icon-back@3x.png" alt="" /></a></div>
        	<div class="weui-flex__item returnSpan"><div class="placeholder" style="font-size: 18px;">{lang create_corpus}</div></div>
        	<div class="weui-flex__item"><div class="placeholder"></div></div>
        	<div class="weui-flex__item"><div class="placeholder"></div></div>
    	</div>		
		<div class="weui-cells">				
            <div class="weui-cell" style="border-bottom: 1px solid #F2F4F6;">
                <div class="weui-cell__bd" style="font-size: 17px;">
                    <input class="weui-input" type="text" placeholder="{lang corpus_name}" name="name">
                </div>
            </div>
			<div style="margin-bottom: 10px;padding: 10px 15px;">
				<div class="weui-cell__bd" style="color: #7B7B7B;">{lang choose_the_cover_color}</div>
				<input id="newcorpus_color" type="hidden" name="color" value="$value[color]" />
				<div style="overflow: hidden;">
					<!--{loop $colorarr $val}-->
					<span class="background-choose" style="background-color: $val;" data-color="$val"></span>
					<!--{/loop}-->
				</div>
			</div>	            
        </div>			
		<div class="weui-cell weui-cell_switch" style="margin-top: 15px;">
		    <div class="weui-cell__bd">{lang documentation_allows_comments}</div>
		    <div class="weui-cell__ft">
		        <label for="switchCP" class="weui-switch-cp">
		            <input id="switchCP" class="weui-switch-cp__input" name="comment" type="checkbox" checked="checked" value="1"/>
		            <div class="weui-switch-cp__box"></div>
		        </label>
		    </div>
		</div>
		
		<div style="padding: 15px 10px;">
			<button id="newcorpussubmit_btn" type="submit"  onclick="newcorpus_submit(document.getElementById('newcorpus_form'))"  class="weui-btn weui-btn_primary">{lang create}</button>
		</div>
	</form>
</div>
<!-- 结束 -->
<script type="text/javascript">
//	点击样式处理
	jQuery('.background-choose').on('click', function() {
		jQuery('.background-choose').html('');
		jQuery('#newcorpus_color').val(jQuery(this).data('color'));
		jQuery(this).html('<i class="icon-white glyphicon glyphicon-ok"></i>');
		return false;
	});
	function newcorpus_submit(form) {
		var input = $(form).find('input:text[name="name"]');
		if(input.val() == '') {
			input.focus();
			return false;
		}

		ajaxpost('newcorpus_form', 'return_newcorpus', 'return_newcorpus');
	}
</script>
</body>

</html>